package com.flyco.modules.pms.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.flyco.modules.pms.entity.PmsSkuStock;
import com.flyco.modules.pms.vo.PmsProductSkuForOrderVO;
import com.flyco.modules.pms.vo.PmsProductSkuVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;


import java.util.List;

/**
 * @Description: SKU
 * @Author: flyco
 * @Date:   2019-11-22
 * @Version: V1.0
 */
@DS("master")
@Repository
public interface PmsSkuStockMapper extends BaseMapper<PmsSkuStock> {

	@Transactional(propagation = Propagation.REQUIRES_NEW)
	public List<PmsProductSkuVO> getProductSkuList();

	public List<PmsProductSkuForOrderVO> getProductSkuForOrderList(@Param("storeId") Long storeId, @Param("skuCodes") List<String> skuCodes);

}
